import {request} from "./index"
/** 秒杀商品列表
 * 
 * @param {string} token 
 */
const getSecKill = (token) => {
  return request.get("v1/app/promotion/seckill", {}, {
    'Authorization': token
  })
}

/** 秒杀商品
 * 
 * @param {string} seckillId 
 * @param {string} skuId 
 * @param {string} token 
 */
const killGoods = (seckillId, skuId, token) => {
  return request.post(`v1/app/promotion/seckill/${seckillId}/${skuId}`, {}, {
    'Authorization': token,
    'content-type': 'application/x-www-form-urlencoded;charset=UTF-8'
  })
}


export {
  getSecKill,
  killGoods
}